'use strict'

//引入模块
let koa = require('koa');
let bodyParser = require('koa-bodyparser');
let con = require('./controllers')

//实例化对象
let app = new koa();

//注册bodyparser中间件
app.use(bodyParser());

//注册index.js中间件
app.use(con());

//监听端口
let potr = 4000;
app.listen(potr);

//打印服务器运行地址
console.log(`http://127.0.0.1:${potr}`);

